package org.brownflat.watergate.resources.mysql;

import org.brownflat.watergate.resources.MySqlUpgrade;
import org.springframework.stereotype.Component;

/**
 * <p>&copy Rupert Jones 2011,2012</p>
 *
 * @author rup
 */
@Component
public class Upgrade0010CommitDiff implements MySqlUpgrade {

    private static final int VERSION = 10;

    @Override
    public int getSequence() {
        return VERSION;
    }

    @Override
    public String getSql() {
          return "ALTER TABLE wgate_commit_element ADD COLUMN (before_content text);\n" +
                  "ALTER TABLE wgate_commit_element ADD COLUMN (after_content text);\n" +
                  "ALTER TABLE wgate_commit_element ADD COLUMN (diff_content text);\n" +
                  "ALTER TABLE wgate_commit_element ADD COLUMN (element_type varchar(50));";
    }

    @Override
    public String getName() {
        return "Create commit diff columns";
    }
}
